#ifndef __THREAD_H_
#define __THREAD_H_

#include "Noncopyable.hpp"
#include <pthread.h>

namespace tp{

class Thread
:Noncopyable
{
public:
    Thread();
    virtual ~Thread();
    void start();
    void join();

private:
    static void * start_routine(void *);
    virtual void run() = 0;

private:
    pthread_t _pthid;
    bool      _isRunning;
};

}//end of namespace tp

#endif

